<?php
/**
 * Created by PhpStorm.
 * User: changshuiwang
 * Date: 2016/7/8
 * Time: 15:12
 */

use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use backend\assets\AppAsset;

//$this->title = 'Add';
//$this->params['breadcrumbs'][] = $this->title;

?>
<script src="/js/upload.js"></script>
<script src="/js/upload_img.js"></script>
<script src="/js/site/add.js"></script>
<div id="content">
    <div id="content-header">
        <div id="breadcrumb"> <a href="/site/index" title="Go to Home" class="tip-bottom"><i class="icon-home"></i> Home</a>
            <a href="#" class="tip-bottom">add</a></div>
        <h1><?= Html::encode($this->title) ?></h1>
    </div>
    <div class="widget-box">
    <div class="widget-title"> <span class="icon"> <i class="icon-align-justify"></i> </span>
        <h5>添加学生</h5>
    </div>
    <div class="widget-content nopadding">
        <form action="/site/add" method="post" class="form-horizontal" id="AddForm"
            enctype="multipart/form-data">
            <div class="control-group">
                <label class="control-label">Username :</label>
                <div class="controls">
                    <input type="text" class="span11" name="AddForm[username]"/>
                </div>
            </div>
<!--            <div class="control-group">
                <label class="control-label">Score :</label>
                <div class="controls">
                    <input type="text" class="span11" name="AddForm[score]" />
                </div>
            </div>-->

            <div class="control-group">
                <label class="control-label">Photo :</label>
                <div class="controls">
                    <span id="upd_pics"></span>
                    <input type="file" name="file" id="file" onchange="check_file()"/>
                    <span id="loading" style="display:none;">
                        <img src="/img/loading.gif" alt="loading...">
                    </span>
                    <span id="logo"></span>
                    <input type="hidden" name="filename" id="filename" value="" />
                    <input type="hidden" name="goods_desc" id="goods_desc" value="" />
                    <input type="button" value="上传" onclick="return ajaxFileUpload();"
                           class="btn btn-large btn-primary" />
                </div>
            </div>
<!--            <div class="control-group">
                <label class="control-label">Photo :</label>
                <div class="controls">
                    <input type="file"  class="span11" name="AddForm[photo]" />
                </div>
            </div>-->



            <div class="form-actions">
                <label class="control-label">
                    <button type="submit" class="btn btn-success">Submit</button>
                </label>
            </div>
        </form>
    </div>
</div>
</div>
